package vn.nt.healthcare.server.ws.domain;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

@Entity
public class Company implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	private String company_uuid; //company_uuid
	private String name;
	private String code;
	private String db_user;
	private String db_host;
	private String db_port;
	private String db_pass;
	private String db_name;
	private String logo;
	private String description;
	private String phone;
	
	@Column(name="establish_date")
	private Date establishDate;
	private Date lastchange;
	
	@ManyToOne
	@JoinColumn(name="uuid", nullable=false)
	private User user;
	
	@OneToMany(cascade=CascadeType.ALL, mappedBy="company")
	private List<Location> locations;
	
	public String getCompany_uuid() {
		return company_uuid;
	}
	public void setCompany_uuid(String company_uuid) {
		this.company_uuid = company_uuid;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getDb_user() {
		return db_user;
	}
	public void setDb_user(String db_user) {
		this.db_user = db_user;
	}
	public String getDb_host() {
		return db_host;
	}
	public void setDb_host(String db_host) {
		this.db_host = db_host;
	}
	public String getDb_port() {
		return db_port;
	}
	public void setDb_port(String db_port) {
		this.db_port = db_port;
	}
	public String getDb_pass() {
		return db_pass;
	}
	public void setDb_pass(String db_pass) {
		this.db_pass = db_pass;
	}
	public String getLogo() {
		return logo;
	}
	public void setLogo(String logo) {
		this.logo = logo;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public Date getEstablishDate() {
		return establishDate;
	}
	public void setEstablishDate(Date establishDate) {
		this.establishDate = establishDate;
	}
	public Date getLastchange() {
		return lastchange;
	}
	public void setLastchange(Date lastchange) {
		this.lastchange = lastchange;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public List<Location> getLocations() {
		return locations;
	}
	public void setLocations(List<Location> locations) {
		this.locations = locations;
	}
	public String getDb_name() {
		return db_name;
	}
	public void setDb_name(String db_name) {
		this.db_name = db_name;
	}
	
}
